/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * ProfileSelection2.java
 *
 * Created on Oct 4, 2010, 8:56:32 PM
 */

package cat200project;

import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;

/**
 *
 * @author shyan
 */
public class EMPLOYEE_MENU extends javax.swing.JFrame {

    /** Creates new form ProfileSelection2 */
    public EMPLOYEE_MENU() {
        initComponents();
        setLocationRelativeTo(null);
    }

    EMPLOYEE_MENU(String pose)
    {
        initComponents();
        setLocationRelativeTo(null);
        System.out.println("Current user :"+ pose);
    }


    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        jSeparator1 = new javax.swing.JSeparator();
        title = new javax.swing.JLabel();
        Cashier = new javax.swing.JLabel();
        Reservation = new javax.swing.JLabel();
        jLabel11 = new javax.swing.JLabel();
        EmployeeProfile = new javax.swing.JLabel();
        MenuPofile = new javax.swing.JLabel();
        SalesProfile = new javax.swing.JLabel();
        background = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setMinimumSize(new java.awt.Dimension(400, 300));
        setResizable(false);

        jPanel1.setMinimumSize(new java.awt.Dimension(400, 300));
        jPanel1.setPreferredSize(new java.awt.Dimension(400, 300));
        jPanel1.setLayout(null);
        jPanel1.add(jSeparator1);
        jSeparator1.setBounds(0, 65, 500, 10);

        title.setFont(new java.awt.Font("Times New Roman", 1, 14));
        title.setText("PROFILE SELECTION");
        jPanel1.add(title);
        title.setBounds(25, 26, 160, 33);

        Cashier.setFont(new java.awt.Font("Tw Cen MT Condensed", 0, 16));
        Cashier.setText("Cashier");
        Cashier.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
        Cashier.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                CashierMouseClicked(evt);
            }
            public void mousePressed(java.awt.event.MouseEvent evt) {
                CashierMousePressed(evt);
            }
        });
        jPanel1.add(Cashier);
        Cashier.setBounds(50, 140, 190, 40);

        Reservation.setFont(new java.awt.Font("Tw Cen MT Condensed", 0, 16));
        Reservation.setText("Reservation");
        Reservation.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
        Reservation.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                ReservationMouseClicked(evt);
            }
        });
        jPanel1.add(Reservation);
        Reservation.setBounds(50, 80, 190, 40);

        jLabel11.setFont(new java.awt.Font("Tw Cen MT Condensed", 0, 18));
        jLabel11.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel11.setText("Logout");
        jLabel11.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
        jLabel11.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jLabel11MouseClicked(evt);
            }
        });
        jPanel1.add(jLabel11);
        jLabel11.setBounds(391, 334, 80, 40);

        EmployeeProfile.setFont(new java.awt.Font("Tw Cen MT Condensed", 0, 16));
        EmployeeProfile.setText("Employee profile");
        EmployeeProfile.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
        EmployeeProfile.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                EmployeeProfileMouseClicked(evt);
            }
        });
        jPanel1.add(EmployeeProfile);
        EmployeeProfile.setBounds(50, 200, 190, 40);

        MenuPofile.setFont(new java.awt.Font("Tw Cen MT Condensed", 0, 16));
        MenuPofile.setText("Menu profile");
        MenuPofile.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
        MenuPofile.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                MenuPofileMouseClicked(evt);
            }
        });
        jPanel1.add(MenuPofile);
        MenuPofile.setBounds(50, 320, 190, 40);

        SalesProfile.setFont(new java.awt.Font("Tw Cen MT Condensed", 0, 16));
        SalesProfile.setText("Sales profile");
        SalesProfile.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
        jPanel1.add(SalesProfile);
        SalesProfile.setBounds(50, 260, 190, 40);

        background.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        background.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Image/abstract_0072.jpg"))); // NOI18N
        jPanel1.add(background);
        background.setBounds(0, 0, 500, 400);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 500, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void EmployeeProfileMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_EmployeeProfileMouseClicked
        this.setVisible(false);
        new EMPLOYEE_EDIT().setVisible(true);
    }//GEN-LAST:event_EmployeeProfileMouseClicked

    private void jLabel11MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel11MouseClicked
        this.setVisible(false);
        new EMPLOYEE_LOGIN().setVisible(true);
    }//GEN-LAST:event_jLabel11MouseClicked

    private void MenuPofileMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_MenuPofileMouseClicked
        this.setVisible(false);
        try
        {
            new MENU_EDIT().setVisible(true);
        }
        catch (SQLException ex)
        {
                    Logger.getLogger(EMPLOYEE_MENU.class.getName()).log(Level.SEVERE, null, ex);
                }// TODO add your handling code here:
    }//GEN-LAST:event_MenuPofileMouseClicked

    private void ReservationMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_ReservationMouseClicked
        try {
            new CUS_RESERVATION_EDIT().setVisible(true);
        } catch (SQLException ex) {
            Logger.getLogger(EMPLOYEE_MENU.class.getName()).log(Level.SEVERE, null, ex);
        }
        this.setVisible(false);
        // TODO add your handling code here:
    }//GEN-LAST:event_ReservationMouseClicked

    private void CashierMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_CashierMousePressed
        // TODO add your handling code here:
    }//GEN-LAST:event_CashierMousePressed

    private void CashierMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_CashierMouseClicked
        
            try {
                new CASH_SUMMARY().setVisible(true);
            } catch (SQLException ex) {
                Logger.getLogger(EMPLOYEE_MENU.class.getName()).log(Level.SEVERE, null, ex);
            }
            this.setVisible(false);
// TODO add your handling code here:
    }//GEN-LAST:event_CashierMouseClicked

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new EMPLOYEE_MENU().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel Cashier;
    private javax.swing.JLabel EmployeeProfile;
    private javax.swing.JLabel MenuPofile;
    private javax.swing.JLabel Reservation;
    private javax.swing.JLabel SalesProfile;
    private javax.swing.JLabel background;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JLabel title;
    // End of variables declaration//GEN-END:variables

}
